Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overlay UI element #633

Closed
wants to merge 11 commits into from

Conversation

g547315
Copy link
Contributor

@g547315 g547315 commented Sep 18, 2023

References

#15090

Code changes

Added and styled Add overlay UI element

User-facing changes

Backwards-incompatible changes

None

@krassowski
Copy link
Member

Before putting more work into this, it might benefit from some more discussion on how we want to implement this. I can imagine that we might in future want to add the shortcut overlays to other UI elements too. Maybe a more generic approach would be better? I can imagine using a data attribute on elements with shortcuts to be highlighted and then creating the overlays as needed. In particular this could also work for toolbar buttons without duplicating the code. As for the trigger (when the overlay is shown), possibly it could be a part of lumino keybindings processing loop?

CC @brichet who is working on rewriting toolbar buttons and also looked into keybindings recently to ask about thoughts on the implementation proposed above.

@brichet
Copy link
Contributor

brichet commented Sep 21, 2023

Thanks @krassowski for the ping.
I agree that we should use a more generic approach.
Using a data attribute on elements could be a good way of displaying the overlay on any element. This would work for toolbar buttons and should also work for extension elements.

AFAIK there is currently no link between an 'active' element (clickable) and its shortcut equivalent. For toolbar buttons the shortcuts could probably be inferred from the command (which are identical). However I don't know how it could be generalized to any element, like the tabbar, which is not described the same way...

@g547315
Copy link
Contributor Author

g547315 commented Sep 25, 2023

Do we have a proposed generic approach for the overlays that is suitable or can we use this current implementation as it provides value to the end user while this is looked further into.

Happy to refactor the code when that time comes, the only thing i would like to be considered is that the proposed solution has a css visibility attribute

@krassowski
@brichet

@bollwyvl bollwyvl added the enhancement New feature or request label Sep 28, 2023
configuration: docs/source/conf.py

build:
os: ubuntu-22.04
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tonyfast
Copy link

i am trying to test this pull request on https://lumino--633.org.readthedocs.build/en/633/examples/dockpanel/index.html . i am not seeing anything happen when i press the prescribed key combinations. is there anyway to update to the examples with this working feature so its easier to test?

@g547315
Copy link
Contributor Author

g547315 commented Oct 3, 2023

i am trying to test this pull request on https://lumino--633.org.readthedocs.build/en/633/examples/dockpanel/index.html . i am not seeing anything happen when i press the prescribed key combinations. is there anyway to update to the examples with this working feature so its easier to test?

This by itself will just add a hidden div element called lm-TabBar-UI-Overlay to every tab on the side panels

@tonyfast

@tonyfast
Copy link

tonyfast commented Oct 3, 2023

* To see the interned functionality (without the short-cut number in the overlay) please combine this PR with:
  extend keystrokes to mod keys:[extend keystrokes to mod keys #637](https://github.com/jupyterlab/lumino/pull/637)

i do not have an easy way to test accessibility builds on multiple branches. it is really time consuming and technically challenging to build these results then test them with assistve tech. i'd really like to help move these pull requests forward, but their structure makes it really hard to test. is there anyway to combine these pull requests into something that can be tested easier? ideally testing the outcomes on the lumino examples would be best.

@g547315
Copy link
Contributor Author

g547315 commented Jan 5, 2024

This PR is replaced by this PR as it implements a more generic approach to overlays that is reusable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants